import os,sys,os.path 

import soya,soya.sdlconst as sdlc

class Character(soya.World):
    def __init__(self,parent):
        
        soya.World.__init__(self,parent)
        self.model=soya.AnimatedModel.get("paker_testing")

if __name__=="__main__":
    soya.path.append(os.path.join(os.path.dirname(sys.argv[0]),"..", "game_data"))
    soya.init()
    w=soya.World()
    c=Character(w)
    camera=soya.Camera(w)
    camera.z+=3
    camera.y+=2
    soya.set_root_widget(camera)        
    
    soya.Light(w).set_xyz(4, 4, 4)
    
    while True:
        for event in soya.process_event():
            if event[0]==sdlc.KEYDOWN:
                soya.quit()
                sys.exit()
            soya.render()
    soya.quit()
    